package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.blankj.utilcode.util.ToastUtils;
import com.bumptech.glide.Glide;
import com.youth.banner.listener.OnPageChangeListener;

import java.util.List;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.adapter.DrawDetailAdapter;
import flc.ast.adapter.WallpaperDetailAdapter;
import flc.ast.bean.CenterBean;
import flc.ast.databinding.ActivityDrawDetailBinding;
import stark.common.basic.utils.FileP2pUtil;
import stark.common.basic.utils.FileUtil;
import stark.common.basic.utils.IntentUtil;
import stark.common.bean.StkResBean;

public class DrawDetailActivity extends BaseAc<ActivityDrawDetailBinding> {

    public static String imgPath;

    @Override
    protected int onCreate() {
        return R.layout.activity_draw_detail;
    }

    @Override
    protected void initView() {
        mDataBinding.ivDrawDetailBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
        mDataBinding.ivShare.setOnClickListener(this);
        mDataBinding.ivSave.setOnClickListener(this);
        Glide.with(mContext).load(imgPath).into(mDataBinding.ivDrawDetail);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()){
            case R.id.ivShare:
                IntentUtil.shareImage(mContext,"",imgPath);
                break;
            case R.id.ivSave:
                FileP2pUtil.copyPrivateImgToPublic(mContext,imgPath);
                ToastUtils.showShort(getString(R.string.save_to_album));
                break;
        }
    }

    @Override
    protected void initData() {

    }
}